home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGNG_C
/
MCD.LZH
/
MCD-3.EXE
/
MCD.DOC
< prev
next >
Wrap
Text File
|
1992-03-26
|
44KB
|
1,075 lines
M M CCC DDDD
MM MM C C D D
M M M C D D
M M C C D D
M M CCC DDDD
Mouse Cursor Designer
Version 2.00
26 March 1992
Copyright (C) 1989-92 by Rimrock Software
All Rights Reserved
┌─────────┐
┌─────┴───┐ │ (R)
──│ │o │──────────────────
│ ┌─────┴╨──┐ │ Association of
│ │ │─┘ Shareware
└───│ o │ Professionals
──────│ ║ │────────────────────
└────╨────┘ MEMBER
Rimrock Software
P.O. Box 2406
Hayden, ID 83835
(208) 772-9347 (after 6 pm Pacific Time)
MCD Shareware Information
MCD is a shareware product. No matter how you obtained this product, we
encourage you to freely copy and distribute MCD, provided that
1. No fee is charged beyond normal media duplication and shipping costs.
2. The MCD archive distribution file must be distributed in its original
form. Specifically, the files listed in the PACKING.LST must be
included. None of these files should be altered, and no new files
should be added. Advertising within the MCD archive file is
prohibited.
3. Commercial use of MCD is prohibited unless the program is registered
for the specific number of computers on which it will be used.
See the ORDER.FRM file for more licensing information.
If you received MCD as shareware, i.e., you didn't pay a registration fee for
it or you got it from a shareware library, and you use it on a regular basis,
you must register the program using the accompanying order form. Registering
shareware encourages program authors to continue making improvements to
programs and to create newer and better software.
For your $39 registration fee, you will receive the latest registered version
of MCD, all accompanying files, and a printed user's manual. You will also be
entitled to unlimited technical support.
Rimrock Software is a member of the Association of Shareware Professionals
(ASP). ASP wants to make sure that the shareware principle works for you. If
you are unable to resolve a shareware-related problem with an ASP member by
contacting the member directly, ASP may be able to help. The ASP Ombudsman
can help you resolve a dispute or problem with an ASP member, but does not
provide technical support for members' products. Please write to the ASP
Ombudsman at 545 Grover Road, Muskegon, MI 49442-9427 or send a CompuServe
message via easyplex to ASP Ombudsman 70007,3536
Page i
TABLE OF CONTENTS
Introduction to MCD . . . . . . . . . . . . . . . . . . . . . . 1
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . 1
System Requirements . . . . . . . . . . . . . . . . . . . . 1
Technical Support . . . . . . . . . . . . . . . . . . . . . 1
Registration Information. . . . . . . . . . . . . . . . . . 2
Using MCD . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Running MCD . . . . . . . . . . . . . . . . . . . . . . . . 2
MCD and the Mouse . . . . . . . . . . . . . . . . . . . . . 2
MCD and the Keyboard. . . . . . . . . . . . . . . . . . . . 3
The MCD Display . . . . . . . . . . . . . . . . . . . . . . 4
The Pulldown Menu . . . . . . . . . . . . . . . . . . . . 5
File Menu . . . . . . . . . . . . . . . . . . . . . . . 5
Edit Menu . . . . . . . . . . . . . . . . . . . . . . . 7
Generate Menu . . . . . . . . . . . . . . . . . . . . . 8
Info Menu . . . . . . . . . . . . . . . . . . . . . . . 9
The File Frame. . . . . . . . . . . . . . . . . . . . . . 9
The Mask Information Frames . . . . . . . . . . . . . . . 9
The Editing Frames. . . . . . . . . . . . . . . . . . . .10
The Toolboxes . . . . . . . . . . . . . . . . . . . . . .11
Creating a Mouse Cursor . . . . . . . . . . . . . . . . . . . .12
See-through Cursors . . . . . . . . . . . . . . . . . . . .13
Overlay Cursors . . . . . . . . . . . . . . . . . . . . . .13
Animated Cursors. . . . . . . . . . . . . . . . . . . . . .14
Using MCD Mouse Cursors . . . . . . . . . . . . . . . . . . . .14
Generic C . . . . . . . . . . . . . . . . . . . . . . . . .14
Pascal. . . . . . . . . . . . . . . . . . . . . . . . . . .15
MCD2C - Convert .MCD files to .C. . . . . . . . . . . . . . . .16
Page ii
Introduction to MCD
-------------------
Overview
--------
MCD, the Mouse Cursor Designer allows programmers to design graphical
mouse cursors for their graphics programs and for EGA/VGA text programs
using the TesSeRact C eXtended Library (TCXL) version 6 (TCXL is copyright
(C) 1987-92 by Innovative Data Concepts). MCD allows you to modify the
two masks that, together, compromise a mouse cursor. You may save cursor
designs and reload them. MCD can generate source code from the cursor
designs for C, Pascal, Basic and Assembly Language. The cursor designs
are stored in a form that is directly compatible with programs using TCXL.
By taking advantage of the way a mouse driver displays its graphic mouse
cursor, you can create mouse cursors that are see-through, overlayed or
animated. These three cursor types are explained later in this manual.
MCD was written using Borland International C++, version 3.0. It uses the
TEGL Toolkit for its display functions (TEGL is copyright (C) 1989-92 by
TEGL Systems Corporation).
System Requirements
-------------------
DOS Version: 2.10 or higher
Memory: 640k
Disk drives: 1 floppy or hard disk for file storage/retrieval.
Display: EGA, VGA or Hercules display required.
Other: A Microsoft compatible mouse and driver is optional
but desirable.
Technical Support
-----------------
If you have any questions regarding MCD, you may call Rimrock Software for
technical assistance. Technical support is available throughout the week,
from 6:00 pm to 10:00 pm, Pacific time. The phone number is (208) 772-
9347. Technical support is NOT limited to registered users, although we
encourage you to register the MCD package.
You may reach Rimrock Software on CompuServe. We regularly monitor the
SHAREWARE forum, section 1, for questions about our software. Please
direct your questions to Michael Burton, 71211,70.
You may obtain the latest shareware version of MCD, and ask questions
about it, on the Tech Board BBS, (208) 765-0180. The Tech Board sysop is
Dan Boss and he has kindly provided an area for support of Rimrock
Software products. Many thanks, Dan.
Page 1
Registration Information
------------------------
The unregistered version of MCD is a fully functional, uncrippled program.
If you find this program to be useful, you can become a registered user.
Registration entitles you to the latest version of the program and a
bound, printed manual, as well as unlimited technical support. The only
difference between the registered and the unregistered versions of the
program is that the registered version does not have any registration
reminders. An order form is included with MCD, and may be printed by
entering the following at the DOS prompt:
COPY ORDER.FRM PRN
Be sure to fill out all the information on the order form, including the
MCD unregistered version you are using.
Using MCD
---------
Running MCD
-----------
MCD is easy to use. The only file necessary is MCD.EXE. To run the
program, simply enter
MCD
No command line options are available. When MCD executes, you will see a
registration request screen. You may continue on to the MCD display by
pressing any key.
MCD and the Mouse
-----------------
MCD does not require a mouse. If you have one, though, using MCD is much
easier.
Moving the mouse will produce corresponding motion of the cursor on the
MCD display.
Clicking the left mouse button will select whatever item you happen to
have the cursor pointing at. For instance, to pull down the File menu,
you would move the cursor to the word 'File' on the menu bar and then
click the left mouse button. To load a file, you would then move the
cursor down to the word 'Load' and click the left mouse button again. If
you are in the Screen Mask Editing Frame (see figure 1), clicking the left
mouse button will change the state of the icon pixel you are pointing at.
If you press and hold down the left mouse button in either Editing Frame,
and move the mouse, then many of the mask pixels will change state.
Page 2
If you press and hold down the right mouse button, you can move the
various MCD frames around. The only frames that are glued down are the
Editing Frames. All the other frames, including the Pulldown Menu, can be
moved.
NOTE: MCD creates a configuration file that contains the positions of all
the frames. If you move them around and then leave MCD, when you reenter
MCD the frames will be where you left them. If you want the frames back
in their default positions, erase the MCD.CFG file.
NOTE: If you move any of the frames so they overlap the Editing Frames,
drawing will slow down. Try to keep the other frames out of the Editing
Frames.
MCD and the Keyboard
--------------------
You can still use MCD, even if you don't have a mouse. You can use the
cursor keys to move the cursor and the Enter key to select an item.
Cursor keys - Move the cursor around. Unshifted cursor keys provide gross
movement, and shifted cursor keys provide fine movement.
Enter key - Functions as the left mouse key. Press and release it to
select an item. In the Editing Frames, you can press and hold the Enter
key down and then move around with the cursor keys to change many pixels.
Alt-F key - Selects the File menu item. You may then select one of the
file options by pressing the underlined letter for that item.
Alt-E key - Selects the Edit menu item. You may then select one of the
edit options by pressing the underlined letter for that item.
Alt-G key - Selects the Generate menu item. You may then select one of
the generate items by pressing the underlined letter for that item.
Alt-I key - Selects the Info menu item. You may then select one of the
info options by pressing the underlined letter for that item.
NOTE: If you press one of the Alt keys and that menu comes down, then
immediately goes away, make sure the cursor is outside of both Editing
Frames, then try that Alt key again.
Ctrl-Break key - A nasty way to leave MCD. You are NOT given a chance to
save your work if you use this key. USE CTRL-BREAK ONLY AS A LAST RESORT.
Use the File Exit menu item to leave MCD normally.
Page 3
The MCD Display
---------------
Other than the registration request screen, there is only one other
display in MCD. There are eight major frames in the display (see figure
1); the Pulldown Menu, the File Frame, the Mask Information Frames, the
Editing Frames and the Toolboxes.
+--------------------------------------------------------------------+
| File Edit Generate Info |
+--------------------------------------------------------------------+
| +--------------+ +--------------+ +--------+ |
| |Screen PX: | |Cursor PX: | |Mouse | |
| |Mask PY: | |Mask PY: | |Cursor | |
| +--------------+ +------+ +--------------+ +------+ |Designer| |
| +----------------+| | +----------------+| | +--------+ |
| | |+------+ | |+------+ |
| | || | | || | |
| | |+------+ | |+------+ |
| | || | | || | |
| | |+------+ | |+------+ |
| | [Screen Mask || | | [Cursor Mask || | |
| | Editing Frame] |+------+ | Editing Frame] |+------+ |
| | || | | || | |
| | |+------+ | |+------+ |
| | || | | || | |
| | |+------+ | |+------+ |
| | || | | || | |
| | |+------+ | |+------+ |
| | || | | || | |
| | |+------+ | |+------+ |
| | || | | || | |
| +----------------++------+ +----------------++------+ |
| |
| +-------------------------------------+ |
| |File: [File Frame] | |
| |-------------------------------------| |
| |Unregistered Version | |
| +-------------------------------------+ |
| |
+--------------------------------------------------------------------+
Figure 1 MCD Editing Display
Page 4
The Pulldown Menu
-----------------
File Menu
---------
The file menu is used to load and save cursor designs, and to
leave MCD when you are finished. It contains four items, detailed
below (see figure 2).
+-----------------
| File Edit Ge
+-------------+---
| Load |
| Save |
| Save as |
+-------------+
| Exit to DOS |
+-------------+
Figure 2 File Menu
In general, when you select a file load or save item, a pop up
file selection window appears (see figure 3). This window
contains an empty file name box, a current directory box, a
scrolling list of file names, a scrolling list of directories and
drives, a Cancel button and an Ok button.
To select a file for loading or saving, you must fill out the
empty file name box. You can do this in two different ways;
clicking on a file name in the file name scrolling list or typing
the name into the file name box.
To click on an existing file name, move the file name list up or
down using the scroll controls, then click on the appropriate file
name. That file name will be displayed in the file name box. If
you need to change to a different directory or drive, click on it
in the directory/drive list.
To type in a file name, click on the empty file name box. A bar
cursor will appear, indicating you may start typing. Type in a
file name.
Once the file name box is filled out, click on the Ok button or
press the Enter key.
NOTE: MCD files have an extension of '.C'. Any extension you
enter in the file name box will be ignored and will be replaced
with '.C'.
Page 5
+-------------------------------------------------------+
| Load Mask |
+-------------------------------------------------------+
| +-----------------+ |
| Filename: | | |
| +-----------------+ |
| +-----------------------------------------+ |
| Directory:|H:\MCD | |
| +-----------------------------------------+ |
| +---------------------+-+ +-----------------------+-+ |
| | ARROW.C |^| | [.] |^| |
| | GUNSIGHT.C +-+ | [..] +-+ |
| | HAIRS.C | | | [MCDSRC] | | |
| | HOURGLAS.C | | | [-A-] | | |
| | PACMAN.C | | | [-B-] | | |
| | POINTS.C | | | [-C-] | | |
| | POINTER.C +-+ | [-D-] +-+ |
| | SHUTTLE.C |V| | [-E-] |V| |
| +---------------------+-+ +-----------------------+-+ |
| +------+ +----+ |
| |CANCEL| | OK | |
| +------+ +----+ |
+-------------------------------------------------------+
Figure 3 File Selection Window
Load
The Load menu item allows you to load a cursor design into MCD
from a C source file. If you select Load and you have not saved
your current work, you will be prompted to do so.
Save
The Save menu item allows you to update a cursor file with the
changes you have made. For new work, selecting Save is the same
as selecting Save as. For old work, the cursor design will be
saved with the current file name.
Save as
Allows you to specify a file into which you may save your work.
This is especially useful if you load a file, make changes, and
then wish to save the changes out as a different file.
Exit to DOS
Quit to DOS allows you to leave MCD and return to DOS. You will
be prompted to save your work, if you have not already done so.
Page 6
Edit Menu
---------
The edit menu provides editing functions that affect one or both
of the Editing Frames (see figure 4).
+----------------------------
| File Edit Generate In
+------+-------------------+-
| Clear Screen Mask |
| Clear Cursor Mask |
| Clear Both Masks |
|-------------------|
| Set Hotspot |
| Test Drive |
+-------------------+
Figure 4 Edit Menu
Clear Screen Mask
The Clear Screen Mask selection turns off all the pixels of the
screen mask. This is the opposite of the default condition of
this mask. You can use the Invert button from the Toolbox to get
the screen mask to its default condition.
Clear Cursor Mask
The Clear Cursor Mask selection turns off all the pixels of the
cursor mask. This is the default condition of this mask.
Clear Both Masks
The Clear Both Masks selection turns off all the pixels of both of
the masks. It also clears the file name, essentially allowing to
start completely over.
Set Hotspot
You may select a hotspot for the cursor you are working on by
clicking on the Set Hotspot function. The hotspot is the place
within a mouse cursor that is referred to by all the mouse
functions, i.e., it is the 'center' of mouse activity. Mouse
interrupt 33h, function 9, requires that you give it the
coordinates of the hotspot when you select a new graphics cursor.
The variables hsx and hsy in each source code file that MCD
generates contain the hotspot coordinates.
Test Drive
You may do an actual 'test drive' with the cursor you are building
by clicking on the Test Drive function. This function swaps the
cursor being worked on with the normal MCD cursor. It also sets
Page 7
the hotspot to that shown in the Cursor Editing Frame. BE CAREFUL
- you could actually lose track of where the cursor is if you
select this function while the cursor you are working on is
invisible. You should also be careful about the hotspot - if you
are test driving a cursor, the hotspot is probably in a different
spot than on the default cursor, so you could end up clicking on
something you didn't mean to.
Generate Menu
-------------
The generate menu contains functions that allow you to generate a
piece of source code from the current cursor design (see figure
5).
------------------------
Edit Generate Info
------+-----------+-----
| Generic C |
| Pascal |
| Basic |
| Assembly |
+-----------+
Figure 5 Generate Menu
Generic C
MCD stores its cursor designs as C source files, but these files
are specifically tailored for use with the TCXL library. The
Generic C menu selection allows you to create a C source file
(.INC file) containing C source code that may be used with any C
program.
Pascal
The Pascal menu selection allows you to create a Pascal source
file (.PAS file) from the cursor design.
Basic
The Basic menu selection allows you to create a Basic source file
(.BAS file) from the cursor design. The source file is compatible
with Quick Basic.
Assembly
The Assembly menu selection allows you to create an assembly
language source file (.ASM file) from the cursor design. The
source file is compatible with most standard 80x86 assemblers.
Page 8
Info Menu
---------
The Info Menu contains information about MCD and how to
register the MCD package (see figure 6).
----------------------------
Generate Info
-----------+------------+---
| About |
| Order Info |
+------------+
Figure 6 Info Menu
About MCD
About contains information about the date and version of
MCD and directs you to Order Info for more information.
Order Info
Order Info displays information about how to create an
order form, so you can register the MCD package.
The File Frame
--------------
The File Frame contains the name of the file you are currently working on.
It also contains a reminder that this version of MCD is unregistered, and
that it would help your conscience to register it (see figure 7).
+-------------------------------------+
|File: [File Frame] * ***** |
|-------------------------------------|
|Unregistered Version |
+-------------------------------------+
Figure 7 File Frame
A picture of what the cursor design will look like is displayed to the
right of the file name. The picture shows the cursor against both a black
and a white background, so you can get a fair idea of what the cursor look
like in both circumstances. An empty black strip is also provided so you
may run a cursor through it on a test drive.
The Mask Information Frames
---------------------------
The Mask Information Frames display two important bits of information.
They show the X and Y coordinates of where you currently are in a
particular Editing Frame. This is helpful when editing from a completely
white (inverted) image (see figure 8).
Page 9
+---------------+ +---------------+
|Screen PX: 5 | |Cursor PX: 4 |
|Mask PY: 12 | |Mask PY: 7 |
+---------------+ +---------------+
Figure 8 Mask Information Frames
The Editing Frames
------------------
The Editing Frames are where all the real action takes place in MCD (see
figure 9). The current masks are displayed in the Frames in a magnified
view. You may set or clear any pixels in either Frame. To set a pixel,
move to it and click. To clear a pixel, do the same thing. Each Editing
Frame has a corresponding Toolbox that allows you to make changes to the
Frame.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |*| | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |*|*| | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |*|*|*| | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |*|*|*|*| | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |*|*|*|*|*| | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |*|*|*|*|*|*| | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |*|*|*|*|*|*|*| | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |*|*|*|*|*|*|*|*| | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |*|*|*|*|*|*|*|*|*| | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |*|*|*|*|*| | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |*|*| | |*|*| | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |*| | | |*|*| | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | |*|*| | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | |*|*| | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 9 Editing Frame
Page 10
The Toolboxes
-------------
The Toolbox allows you to make gross changes to the Editing Frames. Each
Toolbox is located adjacent to the Editing Frame it applies to. There are
nine buttons; up, down, left, right, flip horizontal, flip vertical,
rotate, invert and copy (see figure 10).
+-------+ +-------+
| ^ | | ^ |
| ^ | | ^ |
+-------+ +-------+
| v | | v |
| v | | v |
+-------+ +-------+
| | | |
| << | | << |
+-------+ +-------+
| | | |
| >> | | >> |
+-------+ +-------+
| | | |
| <-> | | <-> |
+-------+ +-------+
| ^ | | ^ |
| v | | v |
+-------+ +-------+
| +-+ | | +-+ |
| | v | | | v |
+-------+ +-------+
| | | |
| *-O | | *-O |
+-------+ +-------+
| | | |
| <-C | | <-S |
+-------+ +-------+
Figure 10 The Toolboxes
When you click on an up arrow button, the Editing Frame contents is moved
up by one pixel row. The top row of pixels is lost.
When you click on a down arrow , the Editing Frame contents is moved down
by one pixel row. The bottom row of pixels is lost.
When you click on a left arrow button, the Editing Frame contents is moved
to the left by one pixel column. The left column of pixels is lost.
When you click on a right arrow button, the Editing Frame contents is
moved to the right by one pixel column. The right column of pixels is
lost.
Page 11
Clicking on a flip horizontal button flips the Editing Frame contents over
horizontally, i.e., a left to right mirror image of the frame contents is
produced.
Clicking on a flip vertical button flips the Editing Frame contents over
vertically, i.e., a top to bottom mirror image of the frame contents is
produced.
Clicking on a rotate button rotates the Editing Frame contents 90 degrees
clockwise.
Clicking on an invert button inverts the Editing Frame contents. All the
pixels that were set are cleared and all the pixels that were clear are
set.
Clicking on a copy button copies the contents of the other Editing Frame
into the one you are working on, i.e., clicking on <-C copies the Cursor
Editing Frame into the Screen Editing Frame, and clicking on <-S copies
the Screen Editing Frame into the Cursor Editing Frame.
Creating a Mouse Cursor
-----------------------
Now that you know how MCD works, let's learn how to create a mouse cursor.
The first thing you should know is how a mouse driver displays a mouse cursor.
The driver gets the 16 bit by 16 bit area of the display where the mouse
cursor will be displayed and logically ANDs that area with the screen mask.
This means that all the pixels on the display that correspond to ones in the
screen mask will remain unchanged, while all the pixels on the display that
correspond to zeroes in the screen mask will be set to zero.
Next, the results of the ANDing are XORed (exclusively Ored) with the cursor
mask. This means that all the pixels on the display (following the above
ANDing) corresponding to zeroes in the cursor mask will remain unchanged,
while all the pixels on the display corresponding to ones in the cursor mask
will have their bits flipped (ones for zeroes and zeroes for ones).
If this sounds confusing, you're right - it is. Just remember to pay
attention to the cursor images shown in the File Frame, and you should be ok.
The following is a general guide of how to build a mouse cursor.
1. Make sure that you start with the screen mask filled with pixels and
the cursor mask empty.
2. Build your cursor in the Cursor Editing Frame by setting or clearing
pixels. Check the display in the File Frame to make sure your cursor
looks the way you want it to.
Page 12
3. When you finish with the cursor design in the Cursor Editing Frame, you
must decide whether your cursor is to be a see-through cursor, overlay
cursor or an animated cursor. Overlay and animated cursors require changes
in the Screen Editing Frame. If your cursor is animated or an overlay
cursor, read the appropriate sections of this manual for what to do next.
NOTE: Most mouse cursors are overlay cursors.
4. Be sure to set the hotspot on your cursor where you want it to be.
5. Save your work when you have finished designing the cursor. You may
also generate source code for other languages at this time.
See-through Cursors
-------------------
A see-through cursor allows you to see most of the object that the cursor
is overlaying. A see-through cursor is simply one where all the pixels
in the screen mask are set. This means that the only places that get
changed are the pixels in the cursor mask that are set. The HAIRS cursor
included with this program is a good example of a see-through cursor.
Overlay Cursors
---------------
An overlay cursor is drawn on the display so that it completely overlays
whatever is underneath it. Most overlay cursors have their hotspots at
one edge of the cursor, so the user may see what the cursor is actually
pointing at. Examples of overlay cursors are PENCIL, FINGER and ARROW.
To create an overlay cursor, you must do the following:
1. After you have drawn your cursor in the Cursor Editing Frame, go over
to the Screen Editing Frame Toolbox and click on the <-C (copy) button.
This will copy the cursor mask image into the Screen Editing Frame.
2. Click on the *-O (invert) button in the Screen Editing Frame Toolbox.
This will make a negative image of the screen mask.
3. Clear all the pixels within the boundary of the cursor image in the
Screen Editing Frame.
4. If you want the cursor to be outlined (if there is enough room to do
that), go around the outside of the image in the Screen Editing Frame and
clear out one more layer of pixels.
5. Check the File Frame to see if you have the results you want. Test
drive the cursor if necessary. Be sure to save your work.
Page 13
Animated Cursors
----------------
Mouse graphics cursors can allow limited animation because of the way they
are displayed. The animation occurs when the cursor is moved from a dark
area to a light area on the display (and vice versa). Examples of
animated cursors are FACEIT, SPERM and PACMAN.
To create an animated cursor, you must do the following:
1. After you have drawn your cursor in the Cursor Editing Frame, you must
decide what pieces of it should disappear when the cursor moves from a
dark area to a light area. Go over to the Screen Editing Frame and turn
the corresponding pixels off in that mask. For example, in FACEIT, the
corners of the mouth and the frown are erased by turning those pixels off
in the Screen Editing Frame.
2. Decide what new pieces of the cursor must be on when the cursor is in a
light area, then turn those pixels OFF in the Screen Editing Frame. Make
sure that those areas do not coincide with areas in the Cursor Editing
Frame that are turned on. For example, in FACEIT, the mouth is turned into
a smile by erasing two small areas on the screen mask.
3. Test drive the cursor. Make sure it acts the way you want by moving
between dark and light areas in the File Frame. Be sure to save your
work.
Using MCD Mouse Cursors
-----------------------
To change the shape of a mouse cursor in your program, you must use the mouse
driver interrupt, int 33h, function 9 (Set Graphics Pointer Shape). Any
program using a mouse will use the mouse interrupt, so you should be familiar
with the general capabilities of this interrupt. If not, you may learn about
it in a number of references, including Ray Duncan's Advanced MSDOS
Programming book and the Microsoft Mouse Programmers Reference Guide.
Generic C
---------
The following code allows you to access int 33h, and provides an example
of changing the mouse cursor shape for a C program. Note that your C
compiler's library must have 'intr', 'FP_OFF' and 'FP_SEG' functions, or
their equivalents, to perform the required operation.
Page 14
#include <dos.h>
/* ====================================================
Include file PENCIL.INC for generic C
Created by MCD - Mouse Cursor Designer, version 2.00
MCD is Copyright (C) 1989-92 by Rimrock Software
All rights reserved.
==================================================== */
unsigned int hsxPENCIL = 3;
unsigned int hsyPENCIL = 15;
unsigned int cursorPENCIL[32] = {
0x83ff,0x1ff,0x1ff,0x1ff,0x1ff,0x1ff,0x1ff,0x1ff,
0x1ff,0x1ff,0x1ff,0x1ff,0x1ff,0x83ff,0xc7ff,0xefff,
0x0,0x7c00,0x4400,0x4400,0x7c00,0x4400,0x4400,0x4400,
0x4400,0x4400,0x4400,0x7c00,0x7c00,0x3800,0x1000,0x0};
void main()
{
/* Register set for mouse use */
struct REGPACK rgs;
/* Do your graphics setup, etc. here */
rgs.r_ax = 9; /* mouse function 9 */
rgs.r_bx = hsxPENCIL; /* hotspot x */
rgs.r_cx = hsyPENCIL; /* hotspot y */
rgs.r_dx = FP_OFF(cursorPENCIL); /* offset addr of cursor */
rgs.r_es = FP_SEG(cursorPENCIL); /* segment addr of cursor */
intr(0x33,&rgs); /* set mouse cursor */
rgs.r_ax = 1; /* show mouse cursor */
intr(0x33,&rgs);
/* rest of your program here */
}
Pascal
------
The following Pascal source fragment shows how to access the mouse
interrupt and how to use it to change the mouse cursor shape. It uses the
Turbo Pascal 'Intr', 'Seg' and 'Ofs' functions to accomplish this.
Page 15
Program TestCursor;
Uses DOS, Graph;
(* ====================================================
Source file PENCIL.PAS for Pascal
Created by MCD - Mouse Cursor Designer, version 2.00
MCD is Copyright (C) 1989-92 by Rimrock Software
All rights reserved.
==================================================== *)
Const
hsxPENCIL : Word = 3;
hsyPENCIL : Word = 15;
cursorPENCIL : Array [0..31] of Word = (
$83ff,$1ff,$1ff,$1ff,$1ff,$1ff,$1ff,$1ff,
$1ff,$1ff,$1ff,$1ff,$1ff,$83ff,$c7ff,$efff,
$0,$7c00,$4400,$4400,$7c00,$4400,$4400,$4400,
$4400,$4400,$4400,$7c00,$7c00,$3800,$1000,$0);
Begin
Var
R: Registers; { Register set for mouse use }
{ Do your graphics setup, etc. here }
R.AX := 9; { mouse function 9 }
R.BX := hsxPENCIL; { hotspot x }
R.CX := hsyPENCIL; { hotspot y }
R.DX := Ofs(cursorPENCIL[0]);{ offset addr of cursor }
R.ES := Seg(cursorPENCIL[0]);{ segment addr of cursor }
Intr($33,R); { set mouse cursor }
R.AX := 1; { show mouse cursor }
Intr($33,R);
{ rest of your program here }
End.
MCD2C - Convert .MCD files to .C
--------------------------------
For those who are using older versions of MCD, the program MCD2C has been
provided to help convert the old .MCD cursor files to the .C format. MCD2C is
quite easy to use. Simply enter MCD2C and the name of the file you want
converted. A new file with the same file name and an extension of .C will be
generated in the same directory. Wild card file characters are allowed and an
extension of .MCD is assumed. For example, to convert all .MCD files to .C in
the TEMP directory of drive D, you would enter
MCD2C D:\TEMP\*
Page 16
To convert all the files that start with the letters ARR, you would enter
MCD2C ARR*
or
MCD2C ARR?????
NOTE: Be careful when using MCD2C. The program makes no checks for already
existing files. It will destroy any .C files with the same file name as the
one(s) being converted.
Page 17